<?php
abstract class page
{
	function __construct($chooseCity=true)
	{
		if(file_exists('../class/class_login.php'))include('../class/class_login.php');
			//else include('../www/class/class_login.php');
		$aLogin=new login();
		$year=date('Y');
		echo ('
<!DOCTYPE html>
<html>
 <head>
 	<title>
 	');
 	$this->title();
 	echo ('
 	</title>
   <link rel="shortcut icon" type="image/ico" href="http://pro-g
orod.com/images/favicon1.ico" />
   <link rel="stylesheet" type="text/css" href="style/mobstyle.css" />
   <meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no">
   <script type="text/javascript" src="http://pro-gorod.com/jquery/jquery.js">
	</script>
	<script type="text/javascript" src="scripts/mobrubricator.js">
	</script>
 </head>
 <body>
	 <div class="fon">
	 	<div class="photoFrame">
	 	</div>
	 </div>
	 <div class="docBody">
		<div class="main">
	    	<div class="maincontent">
	  	');
	  	$this->mainContent();
	  	echo ('
	    	</div>
	    	<div class="footer">
	    		<table>
	    			<tr id="footerTr1">
	    				<td id="footerTd1" width="200">

	    				</td>
	    				<td id="footerTd2" width="400">
	    					<a href="http://pro-gorod.com/index.php?city='.$_GET['city'].'">Полная версия</a>
	    				</td>

	    			</tr>
	    		</table>
	    	</div>
		</div>
		
	 </div>
	<div class="header">
		
	<table border="0" class="headerTable">
		<tr>
		<td class="headerSpace">
			&nbsp;
		</td>
		<td>	
		<div>
					<script type="text/javascript" src="scripts/searchSuggest.js">
					</script>
		 			<form name="search" id="searchForm" action="search.php" method="get">
						<input name="search" id="search" type="text" value="'.$_GET['search'].'" placeholder="Поиск" autocomplete="off">
						<input name="city" id="cityHidden" type="hidden" value="'.$_GET['city'].'">
						<input id="searchSubmit" type="image" value="Поиск" src="images/search2.jpg">
						<div class="searchRes">
						</div>
					</form>
		</div>
		<table>
			<tr>
		 			');
				if($chooseCity)
				{
					echo ('
					<link rel="stylesheet" type="text/css" href="style/mobChooseCity.css" />
					<script type="text/javascript" src="scripts/chooseCity.js">
					</script>
					');
					@include('../includes/cities.php');
					//print_r($region);
					if($_GET['city'])$city=$_GET['city'];
					else
					{
						$city="Выберите Город";
					}
					if(!$_GET['city'])$curRegion="Выберите регион";
					else
					{
						foreach($region as $regionKey=>$regionCities)
						{
							if(in_array($city, $regionCities))
							{
								$curRegion=$regionKey;
								break;
							}
						}
					}
					$cityRus=new city_rus_class();
					echo ('
					<div class="chooseCity">
					<td valign="top" class="regionTd">
						<div class="region" id="region"><div class="curRegion">'.$curRegion.'</div></div>
					</td>
					<td valign="top" class="cityTd">
						<div class="city" id="firstcity"><div class="curCity">'.$cityRus->city_rus_im($city).'</div></div>
					</div>
					</td>
					');
				}
				echo ('
			</tr>
		</table>
		</td>
		</tr>
	</table>
	</div>
	<div class="l_colomn">
			<div id="rubbutton">
				<img class="menuButton" src="images/menu2.jpg" />
			</div>
		');
			 	include('includes/mobrubricator.php');
		echo ('
		</div>
 </body>
</html>
		');
	}
	abstract function mainContent();
	abstract function title();
}
?>